const quName = ['亚太区', '欧亚区', '美洲区', '非洲区', '中国区', '集团总部'] // 区域名称
const quCode = [
  '0000111072',
  '0000111073',
  '0000110150',
  '0000110144',
  '0000111104',
  '0000100001',
] // 区域代码

export const tipMessage = (msg) => {
  ElMessage({
    message: msg,
    offset: 300,
    showClose: true,
    duration: 1000,
    customClass: 'permissionTip',
  })
}

// 经纬度转坐标
const lon2xyz = (R, longitude, latitude) => {
  const lon = (Number(longitude) + 90) * (Math.PI / 180)
  const lat = Number(latitude) * (Math.PI / 180)
  const x = R * Math.cos(lat) * Math.sin(lon)
  const y = R * Math.sin(lat)
  const z = R * Math.cos(lon) * Math.cos(lat)
  return { x, y, z }
}

export { quName, quCode, lon2xyz }
